//
// C++ Interface: image
//
// Description: 
//
//
// Author: Os3 s.r.l. <xgui@os3.it>, (C) 2005
//
// Copyright: See COPYING file that comes with this distribution
//
//

#ifndef _XGUI_IMAGE_H_
#define _XGUI_IMAGE_H_

#include "base.h"
#include "object.h"

namespace xguimpl { struct Image; }

namespace xgui
{
    %feature("docstring","derives from :class:`xgui.ObjectClass` ") ImageClass;
	struct ImageClass : public xgui::ObjectClass
	{
		ImageClass();
		std::string const &className();
		bool isInstanceable();
		xgui::Object * create(xgui::Object * parent, xgui::StringMap &properties);
	};
    
    %feature("docstring","**DESCRIPTION**\n\nImage class represents an image loaded from a file.This class cannot be directly instantiated, but must be created using the :meth:`xgui.Master.LoadImage()` function.\n\n**PROPERTIES**\n\n* **path** *(RO):* retrieves the path of the image (the same returned by the method :meth:`xgui.Image.getPath()`)\n\n**METHODS**\n\n") Image;
	class Image : public xgui::Object
	{
		protected:
			Image(std::string const &path);
			virtual ~Image();

		public:
		    %feature("docstring","increments the reference count of the image object and returns the incremented value.\n\n*C++*::\n\n int ref();\n ") ref;
			int ref();
			%feature("docstring","decrements the reference count of the image object and destroyes the object when it reaches 0.\nReturns the decremented value.\n\n*C++*::\n\n int unref();\n\n") unref;
			int unref();
			%feature("docstring","returns the path of the file containing the image that this object represents.\n\n*C++*::\n\n  std::string const &getPath();\n\n ") getPath;
			std::string const &getPath();

            %feature("docstring","returns the width of the image in pixels.\n\n*C++*::\n\n int getWidth();\n\n") getWidth;
			int getWidth();
			%feature("docstring","returns the height of the image in pixels.\n\n*C++*::\n\n int getHeight();\n\n ") getHeight;
			int getHeight();

            %feature("docstring","returns a reference to the implementation class.\n\n*C++*::\n\n xguimpl::Image * getImpl();\n\n ") getImpl;
			xguimpl::Image * getImpl() { return impl_; }
			%feature("docstring","returns true if this object represents a valid image; false otherwise.\n\n*C++*::\n\n bool isValid();\n\n") isValid;
			bool isValid();
	};
}

#endif
